package com.huadi.firematerialident.config;


import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.testng.annotations.IConfigurationAnnotation;

@Configuration
public class MyMvcConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry){
        registry.addViewController("/").setViewName("/user/login");
        //user
        registry.addViewController("/user/login.html").setViewName("/user/login");
        registry.addViewController("/user/register.html").setViewName("/user/register");
        registry.addViewController("/user/usercenter.html").setViewName("/user/usercenter");
        registry.addViewController("/user/userinfo.html").setViewName("/user/userinfo");
        //app
        registry.addViewController("/app/committed").setViewName("/app/committed");
        registry.addViewController("/app/committed.html").setViewName("/app/committed");
        registry.addViewController("/app/appcommit.html").setViewName("/app/appcommit");
        registry.addViewController("/app/identified.html").setViewName("/app/identified");
        //ident
        registry.addViewController("/ident/identified").setViewName("/ident/identified");
        registry.addViewController("/ident/identified.html").setViewName("/ident/identified");
        registry.addViewController("/ident/identify").setViewName("/ident/identify");
        registry.addViewController("/ident/identify.html").setViewName("/ident/identify");
        registry.addViewController("/ident/applicated").setViewName("/ident/applicated");
        registry.addViewController("/ident/applicated.html").setViewName("/ident/applicated");
        //me
        registry.addViewController("/me/mecommit.html").setViewName("/me/mecommit");
        registry.addViewController("/me/melist.html").setViewName("/me/melist");
        //rev
        registry.addViewController("/rev/revlist").setViewName("/rev/revlist");
        registry.addViewController("/rev/revlist.html").setViewName("/rev/revlist");
        registry.addViewController("/rev/review").setViewName("/rev/review");
        registry.addViewController("/rev/review.html").setViewName("/rev/review");
        registry.addViewController("/rev/apslist").setViewName("/rev/apslist");
        registry.addViewController("/rev/apslist.html").setViewName("/rev/apslist");
        //fire
        registry.addViewController("/fire/fireinfo").setViewName("/fire/fireinfo");
        registry.addViewController("/fire/fireinfo.html").setViewName("/fire/fireinfo");
        registry.addViewController("/fire/firecommit").setViewName("/fire/firecommit");
        registry.addViewController("/fire/firecommit.html").setViewName("/fire/firecommit");
        //test
        registry.addViewController("/test").setViewName("MyTest");
    }
}
